﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.redshift
{
	// Token: 0x0200010A RID: 266
	public class TRedshiftCopy : TCustomSqlStatement
	{
		// Token: 0x17000186 RID: 390
		// (get) Token: 0x060008B8 RID: 2232 RVA: 0x00302672 File Offset: 0x00300872
		// (set) Token: 0x060008B9 RID: 2233 RVA: 0x0030267A File Offset: 0x0030087A
		public virtual TObjectName TableName
		{
			get
			{
				return this.tableName;
			}
			set
			{
				this.tableName = value;
			}
		}

		// Token: 0x17000187 RID: 391
		// (get) Token: 0x060008BA RID: 2234 RVA: 0x00302683 File Offset: 0x00300883
		// (set) Token: 0x060008BB RID: 2235 RVA: 0x0030268B File Offset: 0x0030088B
		public virtual TObjectNameList ColumnList
		{
			get
			{
				return this.columnList;
			}
			set
			{
				this.columnList = value;
			}
		}

		// Token: 0x17000188 RID: 392
		// (get) Token: 0x060008BC RID: 2236 RVA: 0x00302694 File Offset: 0x00300894
		// (set) Token: 0x060008BD RID: 2237 RVA: 0x0030269C File Offset: 0x0030089C
		public virtual string FromSource
		{
			get
			{
				return this.fromSource;
			}
			set
			{
				this.fromSource = value;
			}
		}

		// Token: 0x17000189 RID: 393
		// (get) Token: 0x060008BE RID: 2238 RVA: 0x003026A5 File Offset: 0x003008A5
		// (set) Token: 0x060008BF RID: 2239 RVA: 0x003026AD File Offset: 0x003008AD
		public virtual string Credentials
		{
			get
			{
				return this.credentials;
			}
			set
			{
				this.credentials = value;
			}
		}

		// Token: 0x060008C0 RID: 2240 RVA: 0x003026B6 File Offset: 0x003008B6
		public TRedshiftCopy(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstredshiftCopy;
		}

		// Token: 0x060008C1 RID: 2241 RVA: 0x003026CC File Offset: 0x003008CC
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TDummy tdummy = (TDummy)this.rootNode;
			this.tableName = (TObjectName)tdummy.node1;
			if (tdummy.node2 != null)
			{
				this.columnList = (TObjectNameList)tdummy.node2;
			}
			this.fromSource = tdummy.st1.ToString();
			this.credentials = tdummy.st2.ToString();
			return 0;
		}

		// Token: 0x060008C2 RID: 2242 RVA: 0x00302744 File Offset: 0x00300944
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060008C3 RID: 2243 RVA: 0x00302754 File Offset: 0x00300954
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001226 RID: 4646
		private TObjectName tableName;

		// Token: 0x04001227 RID: 4647
		private TObjectNameList columnList;

		// Token: 0x04001228 RID: 4648
		private string fromSource;

		// Token: 0x04001229 RID: 4649
		private string credentials;
	}
}
